package com.itheima.job;

import java.lang.reflect.Method;

public class Test01 {
    @Book(value = "西游记",price = 99,authors = {"吴承恩","白求恩"})
    public void sell(){}

    public static void main(String[] args) throws NoSuchMethodException {
        Class clazz = Test01.class;
        Method method = clazz.getMethod("sell");
        if (method.isAnnotationPresent(Book.class)){
            Book book = method.getAnnotation(Book.class);
            System.out.println(book);
        }
    }
}
